package com.tbit.uqbike.constant;

import com.tbit.uqbike.object.pojo.AccountConfigExt;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author yee_
 * @version 1.0
 * @date 2023/5/11 17:36
 * 系统配置拓展类 默认配置
 */
public class AccountConfigExtDefault {

    public static final String TIMEOFUSEBILLING="timeOfUseBilling";
    private static final Map<String, String> CONFIG_MAP;

    static {
        CONFIG_MAP = new HashMap<>();
        CONFIG_MAP.put("appealReturnConfig", "");
        CONFIG_MAP.put("ble_rssi", "0");
        CONFIG_MAP.put("borrow_range", "0");
        CONFIG_MAP.put("face", "43200");
        CONFIG_MAP.put("faceRecognitionConfig", "");
        CONFIG_MAP.put("face_aly", "0");
        CONFIG_MAP.put("face_hwy", "0");
        CONFIG_MAP.put("face_sm", "0");
        CONFIG_MAP.put("freeTimeDispatch", "0");
        CONFIG_MAP.put("fuselocation", "1");
        CONFIG_MAP.put("helmet", "0");
        CONFIG_MAP.put("machine_range", "10000");
        CONFIG_MAP.put("newuser", "1");
        CONFIG_MAP.put("onlineCustomerService", "1");
        CONFIG_MAP.put("open_helmet", "0");
        CONFIG_MAP.put("open_statusex", "0");
        CONFIG_MAP.put("out_of_area", "0");
        CONFIG_MAP.put("out_of_park", "0");
        CONFIG_MAP.put("rfid", "0");
        CONFIG_MAP.put("rfidAbnormalDay", "15");
        CONFIG_MAP.put("rfid_park_bound", "0");
        CONFIG_MAP.put("ridecard", "1");
        CONFIG_MAP.put("showFranchisee", "0");
        CONFIG_MAP.put("showLowBattery", "0");
        CONFIG_MAP.put("showRefund", "0");
        CONFIG_MAP.put("show_machine", "0");
        CONFIG_MAP.put("socPower", "0");
        CONFIG_MAP.put("socVoice", "0");
        CONFIG_MAP.put("spikeAbnormalDay", "15");
        CONFIG_MAP.put("user_guidance", "1");
        CONFIG_MAP.put("webcam", "0,0");
        CONFIG_MAP.put("weixin_model", "1");
        CONFIG_MAP.put("isSupportWechatProgram", "1");
        CONFIG_MAP.put("isSupportAliProgram", "1");
        CONFIG_MAP.put("defaultWithdrawCashType", "T1");
        CONFIG_MAP.put("notPayLastTimeSendSMS", "1");
        CONFIG_MAP.put("tooFarBorrow","0");
        CONFIG_MAP.put("outOfRange","0");
        CONFIG_MAP.put("powerTime","30");
        CONFIG_MAP.put("quicklyBorrowByScanCode","0");
    }

    private AccountConfigExtDefault() {
    }

    public static List<AccountConfigExt> getDefaultAccountConfigExt(Integer accountId) {
        return CONFIG_MAP.entrySet().stream().map(x -> new AccountConfigExt(accountId, x.getKey(), x.getValue())).collect(Collectors.toList());
    }

    //在线客服开关；0-关闭，1-打开
    public static final String ONLINE_SERVICE_SWITCH_KEY = "onlineServiceSwitch";
    //在线客服url
    public static final String ONLINE_SERVICE_URL_KEY = "onlineServiceUrl";
    //人工客服开关；0-关闭，1-打开
    public static final String HUMAN_SERVICE_SWITCH_KEY = "humanServiceSwitch";

    //打开
    public static final String HUMAN_SERVICE_SWITCH_OPEN_VALUE = "1";


    //账户的客服配置key
    public static final List<String> CUSTOMER_SERVICE_CONFIG_KEY_LIST = new ArrayList<String>(){{
        add(ONLINE_SERVICE_SWITCH_KEY);
        add(ONLINE_SERVICE_URL_KEY);
        add(HUMAN_SERVICE_SWITCH_KEY);
    }};


}
